feat(mise): add MISE_PYTHON_PRECOMPILED_ARCH detection helper#344
feat(mise): add MISE_PYTHON_PRECOMPILED_ARCH detection helper#344
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a portable helper Changes
Sequence Diagram(s)sequenceDiagram
participant ShellInit as Shell startup
participant ArchScript as local/bin/mise-python-arch
participant ShellEnv as Shell environment
participant Mise as mise activation
ShellInit->>ArchScript: invoke (if available)
ArchScript-->>ShellInit: emits "export KEY=VALUE" lines or nothing
ShellInit->>ShellEnv: eval / parse and set env vars (MISE_PYTHON_PRECOMPILED_*)
ShellInit->>Mise: run mise activation (reads env to choose precompiled Python)
Mise-->>ShellEnv: selects appropriate binary (uses env or falls back)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull request overview
Adds a mise bootstrap helper to detect the correct Python precompiled “arch”/platform values and export them during shell startup, aiming to ensure mise selects the right python-build-standalone binaries across supported systems.
Changes:
- Added
local/bin/mise-python-archand a new bats test suite covering several OS/CPU/libc combinations. - Wired the helper into POSIX shell startup (
config/exports) and fish startup (config/fish/exports.fish). - Added a design spec and an implementation plan documenting the approach.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
local/bin/mise-python-arch |
New detection helper that prints shell export ... statements for mise Python precompiled settings. |
config/exports |
Invokes the helper during shell exports to set env vars before mise activate. |
config/fish/exports.fish |
Invokes the helper during fish exports to set equivalent env vars in fish. |
tests/mise_python_arch.bats |
New bats coverage for the helper’s OS/CPU/libc detection outputs. |
docs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.md |
Design spec describing the helper and integration (currently mismatched vs implementation). |
docs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.md |
Implementation plan (currently mismatched vs implementation). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
config/fish/exports.fish (1)
109-118: Whitelist exported keys when parsing helper output.The loop currently exports any parsed key. Restrict to expected keys to avoid accidental env pollution if output format changes.
Proposed hardening
if command -v mise-python-arch >/dev/null 2>&1 for _line in (mise-python-arch 2>/dev/null) # Each line is: export KEY="value" — strip prefix and set in fish set _kv (string replace -r '^export ' '' -- $_line) set _key (string split -m1 '=' $_kv)[1] set _val (string replace -r '^[^=]+="|"$' '' -- $_kv | string replace -ra '"' '') - set -gx $_key $_val + switch $_key + case MISE_PYTHON_PRECOMPILED_ARCH MISE_PYTHON_PRECOMPILED_OS + set -gx $_key $_val + end end end🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/fish/exports.fish` around lines 109 - 118, The current loop using mise-python-arch parses and exports any key into the environment (variables _kv, _key, set -gx), which risks env pollution; modify the loop to only allow a predefined whitelist of expected keys (e.g., PYTHON_ARCH, PYTHON_OS, or whatever keys mise-python-arch should emit) and conditionally call set -gx only when _key is one of those allowed values; keep the parsing steps (_kv, _key, _val) but add a membership check against the whitelist before exporting to avoid exporting unexpected keys.tests/mise_python_arch.bats (1)
31-41: Add tests for uncovered fallback and unsupported-CPU paths.Two important branches are currently untested:
/lib/libc.musl-*fallback behavior and unsupported CPU handling. Adding those tests will lock in the failure-safe behavior.Also applies to: 43-118
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/mise_python_arch.bats` around lines 31 - 41, Add two new tests in tests/mise_python_arch.bats that exercise the untested fallback (/lib/libc.musl-*) and unsupported-CPU branches by reusing the existing _stub_ldd helper to emit controlled outputs: one test should stub ldd to print a musl libc path like "/lib/libc.musl-1.2.3" and assert the script follows the fallback path behavior, and the other should stub ldd to emit an unsupported CPU string (e.g., "unknown" or an arch the script treats as unsupported) and assert the script exits or logs the unsupported-CPU handling; locate and modify the _stub_ldd usage in the same file to create these cases and add assertions around the functions that parse ldd output and select CPU/stdlib paths so the fallback and unsupported branches are covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.md`:
- Line 155: Several triple-backtick fenced code blocks in the document are
missing language identifiers and trigger MD040; locate each fence (the ```
blocks) that currently have no language tag and add an appropriate language
after the opening backticks (e.g., bash, sh, fish, text) so markdownlint stops
flagging them; update every offending fence in the file (the unlabeled ```
blocks near the various examples) to use explicit languages and ensure
consistency for shells/scripts by preferring bash/sh or fish where applicable.
In `@docs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.md`:
- Around line 35-37: The spec's output contract is outdated: update all
descriptions, examples, and integration snippets to reflect that the implemented
script now emits two export lines (export MISE_PYTHON_PRECOMPILED_ARCH=... and
export MISE_PYTHON_PRECOMPILED_OS=...) instead of a single LLVM triple; revise
the wording that currently claims "Prints exactly one line to stdout" and
"single-var export flow" to describe the two-variable export behavior, and
update all expected outputs and code examples that reference the old
single-variable (triple) format so they show both exported variables (including
examples for unknown systems exiting 1), ensuring mentions of
MISE_PYTHON_PRECOMPILED_ARCH and MISE_PYTHON_PRECOMPILED_OS appear in updated
snippets and assertions.
In `@local/bin/mise-python-arch`:
- Around line 12-15: The CPU normalization case for _cpu currently rewrites
unknown CPUs into arbitrary values and exits successfully; instead, validate
supported CPUs and fail fast: update the case in the _cpu normalization block
(the case "$_cpu" in ... esac handling) to include only known mappings
(arm64->aarch64, i386->i686, etc.) and add a default *) branch that prints a
clear error to stderr (mentioning the unsupported "$_cpu" value) and exits
non‑zero (exit 1); apply the same validation pattern to the similar logic around
lines handling CPU/arch normalization (the other case blocks referenced in the
file) so unsupported CPU values do not produce bogus exported arch strings.
- Around line 1-7: The script "mise-python-arch" must source the repository
messaging helper "msgr" so the script can use msgr functions (msgr msg, msgr
run, msgr yay, msgr err, msgr warn); modify the top of the script (before any
msgr usage or early exits) to source the msgr file (e.g., using . or source) so
the msgr functions are available, ensure the sourcing is robust (no-op or error
handling if msgr is missing) and keep existing behavior of printing
MISE_PYTHON_PRECOMPILED_ARCH/OS exports and exit codes intact.
---
Nitpick comments:
In `@config/fish/exports.fish`:
- Around line 109-118: The current loop using mise-python-arch parses and
exports any key into the environment (variables _kv, _key, set -gx), which risks
env pollution; modify the loop to only allow a predefined whitelist of expected
keys (e.g., PYTHON_ARCH, PYTHON_OS, or whatever keys mise-python-arch should
emit) and conditionally call set -gx only when _key is one of those allowed
values; keep the parsing steps (_kv, _key, _val) but add a membership check
against the whitelist before exporting to avoid exporting unexpected keys.
In `@tests/mise_python_arch.bats`:
- Around line 31-41: Add two new tests in tests/mise_python_arch.bats that
exercise the untested fallback (/lib/libc.musl-*) and unsupported-CPU branches
by reusing the existing _stub_ldd helper to emit controlled outputs: one test
should stub ldd to print a musl libc path like "/lib/libc.musl-1.2.3" and assert
the script follows the fallback path behavior, and the other should stub ldd to
emit an unsupported CPU string (e.g., "unknown" or an arch the script treats as
unsupported) and assert the script exits or logs the unsupported-CPU handling;
locate and modify the _stub_ldd usage in the same file to create these cases and
add assertions around the functions that parse ldd output and select CPU/stdlib
paths so the fallback and unsupported branches are covered.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a3e6930c-15d1-4ee1-8024-86d9b1a96d5d
📒 Files selected for processing (6)
config/exportsconfig/fish/exports.fishdocs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.mddocs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.mdlocal/bin/mise-python-archtests/mise_python_arch.bats
|
|
||
| - [ ] **Step 2: Run the tests to confirm they all fail (script not created yet)** | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Add language identifiers to fenced code blocks (MD040).
Several fences are missing language tags and trigger markdownlint warnings. Add explicit languages (for example bash, sh, fish, or text) on each flagged fence.
Also applies to: 213-213, 218-218, 258-258, 307-307, 339-339, 347-347
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 155-155: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.md` at line
155, Several triple-backtick fenced code blocks in the document are missing
language identifiers and trigger MD040; locate each fence (the ``` blocks) that
currently have no language tag and add an appropriate language after the opening
backticks (e.g., bash, sh, fish, text) so markdownlint stops flagging them;
update every offending fence in the file (the unlabeled ``` blocks near the
various examples) to use explicit languages and ensure consistency for
shells/scripts by preferring bash/sh or fish where applicable.
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 3 file(s) based on 3 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ BASH | bash-exec | 3 | 0 | 0 | 0.02s | |
| ✅ BASH | shellcheck | 3 | 0 | 0 | 0.74s | |
| shfmt | 3 | 1 | 0 | 0.01s | ||
| ✅ EDITORCONFIG | editorconfig-checker | 10 | 0 | 0 | 0.06s | |
| markdownlint | 3 | 2 | 0 | 0.69s | ||
| ✅ MARKDOWN | markdown-table-formatter | 3 | 0 | 0 | 0.26s | |
| ✅ REPOSITORY | checkov | yes | no | no | 37.18s | |
| ✅ REPOSITORY | gitleaks | yes | no | no | 6.98s | |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.01s | |
| ✅ REPOSITORY | grype | yes | no | no | 57.44s | |
| ✅ REPOSITORY | kics | yes | no | no | 34.4s | |
| ✅ REPOSITORY | secretlint | yes | no | no | 8.62s | |
| ✅ REPOSITORY | syft | yes | no | no | 2.59s | |
| ✅ REPOSITORY | trivy | yes | no | no | 14.38s | |
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 2.35s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 9.45s |
Detailed Issues
⚠️ MARKDOWN / markdownlint - 2 errors
docs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.md:7:401 error MD013/line-length Line length [Expected: 400; Actual: 514]
docs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.md:7 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "MISE_PYTHON_PRECOMPILED_ARCH D..."]
⚠️ BASH / shfmt - 1 error
diff config/exports.orig config/exports
--- config/exports.orig
+++ config/exports
@@ -516,7 +516,7 @@
# Set precompiled Python arch+OS so mise downloads the right binary
if command -v mise-python-arch > /dev/null 2>&1; then
- if _mise_python_arch_env="$(mise-python-arch 2>/dev/null)" && [ -n "$_mise_python_arch_env" ]; then
+ if _mise_python_arch_env="$(mise-python-arch 2> /dev/null)" && [ -n "$_mise_python_arch_env" ]; then
eval "$_mise_python_arch_env"
fi
unset _mise_python_arch_env
See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

Show us your support by starring ⭐ the repository
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/hooks/stop-lint-gate.sh:
- Around line 10-11: Guard against empty output from the "mise where node" call
so we don't set node_dir to "/bin" and accidentally prepend it to PATH: after
computing node_dir from the mise where node invocation (the node_dir variable),
check that the command returned a non-empty directory path and that the
directory actually exists before appending "/bin" and exporting PATH; only
export PATH="$node_dir:$PATH" when node_dir is non-empty and points to an
existing directory (i.e., validate node_dir from the mise where node result
before using it).
- Around line 14-18: The script unconditionally prepends
"$HOME/.local/bin:/usr/local/bin" to PATH which can shadow the previously set
mise binaries and reselect legacy yarn; change this to only prepend when yarn is
missing or is legacy v1: use command -v yarn and inspect `yarn --version` (or
`yarn -v`) to detect absence or a v1 version string, and only then modify PATH
(the PATH assignment) and run `corepack enable --install-directory
"$HOME/.local/bin"` as currently done; keep the existing `command -v corepack`
guard and `|| true` but make the PATH fallback conditional around those checks
so mise binaries stay first when a modern yarn is already present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a9e3f7cb-d754-429a-be8e-45ac8c974dc4
📒 Files selected for processing (3)
.claude/hooks/stop-lint-gate.shdocs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.mdlocal/bin/mise-python-arch
✅ Files skipped from review due to trivial changes (1)
- docs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.md
🚧 Files skipped from review as they are similar to previous changes (1)
- local/bin/mise-python-arch
| # Fall back to corepack shim locations if yarn is still the legacy v1 | ||
| export PATH="$HOME/.local/bin:/usr/local/bin:$PATH" | ||
| if command -v corepack > /dev/null 2>&1; then | ||
| corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true | ||
| fi |
There was a problem hiding this comment.
Avoid unconditional fallback PATH prepend that can override mise binaries.
Line 15 always prepends $HOME/.local/bin:/usr/local/bin, which can shadow the PATH you just set from mise and reselect legacy yarn. Make this fallback conditional on missing/legacy yarn.
Proposed fix
-# Fall back to corepack shim locations if yarn is still the legacy v1
-export PATH="$HOME/.local/bin:/usr/local/bin:$PATH"
-if command -v corepack > /dev/null 2>&1; then
- corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true
-fi
+# Fall back to corepack shim location only when yarn is missing/legacy
+if ! command -v yarn > /dev/null 2>&1 || yarn --version | grep -q '^1\.'; then
+ export PATH="$HOME/.local/bin:$PATH"
+ if command -v corepack > /dev/null 2>&1; then
+ corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true
+ fi
+fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Fall back to corepack shim locations if yarn is still the legacy v1 | |
| export PATH="$HOME/.local/bin:/usr/local/bin:$PATH" | |
| if command -v corepack > /dev/null 2>&1; then | |
| corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true | |
| fi | |
| # Fall back to corepack shim location only when yarn is missing/legacy | |
| if ! command -v yarn > /dev/null 2>&1 || yarn --version | grep -q '^1\.'; then | |
| export PATH="$HOME/.local/bin:$PATH" | |
| if command -v corepack > /dev/null 2>&1; then | |
| corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true | |
| fi | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/hooks/stop-lint-gate.sh around lines 14 - 18, The script
unconditionally prepends "$HOME/.local/bin:/usr/local/bin" to PATH which can
shadow the previously set mise binaries and reselect legacy yarn; change this to
only prepend when yarn is missing or is legacy v1: use command -v yarn and
inspect `yarn --version` (or `yarn -v`) to detect absence or a v1 version
string, and only then modify PATH (the PATH assignment) and run `corepack enable
--install-directory "$HOME/.local/bin"` as currently done; keep the existing
`command -v corepack` guard and `|| true` but make the PATH fallback conditional
around those checks so mise binaries stay first when a modern yarn is already
present.
|
@copilot apply changes based on the comments in this thread, this thread and this thread. Also fix all linting issues flagged in this comment and make sure you follow this project's code conventions. |
Applied all fixes in commit c509ecf:
All 9 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
.claude/hooks/stop-lint-gate.sh (2)
14-18:⚠️ Potential issue | 🟠 MajorMake fallback PATH/corepack setup conditional on missing Yarn or Yarn v1.
Line 15 currently runs unconditionally and can reorder PATH in ways that bypass the mise-selected toolchain.
Suggested fix
-# Fall back to corepack shim locations if yarn is still the legacy v1 -export PATH="$HOME/.local/bin:/usr/local/bin:$PATH" -if command -v corepack > /dev/null 2>&1; then - corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true -fi +# Fall back to corepack shim location only when yarn is missing/legacy +if ! command -v yarn > /dev/null 2>&1 || yarn --version | grep -q '^1\.'; then + export PATH="$HOME/.local/bin:$PATH" + if command -v corepack > /dev/null 2>&1; then + corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true + fi +fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh around lines 14 - 18, The unconditional PATH prepend and corepack enable must only run when Yarn is absent or is legacy v1: check for command -v yarn and if present run yarn --version (or yarn -v) to detect a leading "1." and only then export PATH="$HOME/.local/bin:/usr/local/bin:$PATH" and call corepack enable --install-directory "$HOME/.local/bin" (the existing corepack enable || true) — otherwise leave PATH alone; update the logic around the PATH export and the corepack enable invocation to be conditional based on these checks (referencing the existing PATH export line and the corepack enable --install-directory invocation).
10-11:⚠️ Potential issue | 🟡 MinorGuard empty
mise where nodeoutput before appending/bin.At Line 10, an empty
mise where nodeyieldsnode_dir=/bin, and Line 11 will prepend it.Suggested fix
- node_dir="$(mise where node 2> /dev/null)/bin" - [ -d "$node_dir" ] && export PATH="$node_dir:$PATH" + node_root="$(mise where node 2> /dev/null || true)" + if [ -n "$node_root" ] && [ -d "$node_root/bin" ]; then + export PATH="$node_root/bin:$PATH" + fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh around lines 10 - 11, The script sets node_dir="$(mise where node 2> /dev/null)/bin" which can produce "/bin" when the command returns empty; update the logic that computes and exports PATH to guard against empty output by checking the raw result of "mise where node" (or the computed node_dir without the appended "/bin") is non-empty and points to an existing directory before appending "/bin" and exporting PATH; modify the node_dir assignment and the subsequent conditional that uses node_dir so you only prepend when the found node path is non-empty and "$node_dir" is a directory.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/skills/adversarial-reviewer/SKILL.md:
- Around line 147-158: Update the untyped code fences in SKILL.md to include a
fence language (e.g., "text") so markdownlint MD040 is satisfied: replace
occurrences of ``` with ```text for the example BUG block around the lines shown
and the other fence at lines ~180-182; specifically edit the triple-backtick
blocks in the SKILL.md content (the two code fences containing the BUG template
and the "No bugs found" block) to use ```text.
---
Duplicate comments:
In @.claude/hooks/stop-lint-gate.sh:
- Around line 14-18: The unconditional PATH prepend and corepack enable must
only run when Yarn is absent or is legacy v1: check for command -v yarn and if
present run yarn --version (or yarn -v) to detect a leading "1." and only then
export PATH="$HOME/.local/bin:/usr/local/bin:$PATH" and call corepack enable
--install-directory "$HOME/.local/bin" (the existing corepack enable || true) —
otherwise leave PATH alone; update the logic around the PATH export and the
corepack enable invocation to be conditional based on these checks (referencing
the existing PATH export line and the corepack enable --install-directory
invocation).
- Around line 10-11: The script sets node_dir="$(mise where node 2>
/dev/null)/bin" which can produce "/bin" when the command returns empty; update
the logic that computes and exports PATH to guard against empty output by
checking the raw result of "mise where node" (or the computed node_dir without
the appended "/bin") is non-empty and points to an existing directory before
appending "/bin" and exporting PATH; modify the node_dir assignment and the
subsequent conditional that uses node_dir so you only prepend when the found
node path is non-empty and "$node_dir" is a directory.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3f1a0aa1-c211-425b-8958-e53de935d626
📒 Files selected for processing (4)
.claude/hooks/stop-lint-gate.sh.claude/skills/adversarial-reviewer/SKILL.mdlocal/bin/mise-python-archtests/mise_python_arch.bats
✅ Files skipped from review due to trivial changes (1)
- local/bin/mise-python-arch
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/mise_python_arch.bats
| ``` | ||
| **BUG: [short title]** | ||
| File: path/to/file:line | ||
| Category: [Checklist category] | ||
| Severity: CRITICAL | HIGH | MEDIUM | LOW | ||
|
|
||
| [Failure description — 1-2 sentences] | ||
|
|
||
| Trigger: [exact input/sequence] | ||
|
|
||
| Fix: [minimal change] | ||
| ``` |
There was a problem hiding this comment.
Fix markdownlint MD040 by adding fence languages.
Both code fences are untyped, which triggers lint warnings and can fail the lint gate.
Minimal lint fix
-```
+```text
**BUG: [short title]**
File: path/to/file:line
Category: [Checklist category]
Severity: CRITICAL | HIGH | MEDIUM | LOW
[Failure description — 1-2 sentences]
Trigger: [exact input/sequence]
Fix: [minimal change]@@
- +text
No bugs found
Also applies to: 180-182
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 147-147: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/skills/adversarial-reviewer/SKILL.md around lines 147 - 158, Update
the untyped code fences in SKILL.md to include a fence language (e.g., "text")
so markdownlint MD040 is satisfied: replace occurrences of ``` with ```text for
the example BUG block around the lines shown and the other fence at lines
~180-182; specifically edit the triple-backtick blocks in the SKILL.md content
(the two code fences containing the BUG template and the "No bugs found" block)
to use ```text.
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
Adds local/bin/mise-python-arch — a POSIX sh script that detects the correct python-build-standalone LLVM target triple for the current machine (OS, CPU, musl vs glibc) and exports it as MISE_PYTHON_PRECOMPILED_ARCH before mise activates in bash/zsh/sh and fish. Avoids source-build fallbacks on Linux when precompiled arch detection fails.
Fixed 3 file(s) based on 3 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
- Remove msgr sourcing block from mise-python-arch (POSIX sh script was sourcing a bash-only script, causing tests to exit with code 2) - Fix config/exports: capture output and only eval on success with non-empty content, preserving exit status (simplified with &&) - Fix config/fish/exports.fish: use pipe + while read -l for safe line-based iteration; add set -l to temp vars to avoid scope leak; add guard for empty key before set -gx - Update spec and plan docs to match actual implementation patterns Agent-Logs-Url: https://github.com/ivuorinen/dotfiles/sessions/496437fa-0294-4d45-95b8-25748b9ae832 Co-authored-by: ivuorinen <11024+ivuorinen@users.noreply.github.com>
Allows mise to select the latest available 3.14.x precompiled binary from python-build-standalone rather than requiring an exact patch that may not yet be published. Also fixes missing final newline in mise-python-arch.
ldd --version exit code was the first in the pipeline, so a non-zero exit from ldd would mask grep's musl detection result. Capture output into a variable first, then grep independently.
Glibc tests stubbed ldd but not the /lib/libc.musl-* fallback check. On musl hosts (Alpine etc.) the elif ls branch would match the real filesystem and flip the expected result to unknown-linux-musl. Add _stub_ls_no_musl helper and call it in all three glibc test cases.
Fresh worktrees lack node_modules so yarn lint fails with a state-file error. Adding yarn install (fast no-op when deps are current) fixes lint runs in worktrees. Also add missing trailing newline on exit 0.
YAML front-matter description line was 177 chars; ec lint requires ≤120. Wrap as a plain multi-line scalar (continuation folds to a single space).
- stop-lint-gate.sh: guard node_root non-empty before appending /bin to PATH, preventing /bin from being spuriously prepended when mise where node returns empty - mise-python-arch: silence unknown-CPU exit to match "exits 1 silently" contract and the unknown-OS wildcard behaviour - tests: add unknown-CPU and musl-via-ls-fallback test cases - adversarial-reviewer/SKILL.md: add text language tag to two bare code fences (MD040) - spec: extend test matrix to rows 10-11 to match new test cases
556a41a to
09bcdb4
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.md (1)
155-157:⚠️ Potential issue | 🟡 MinorAdd missing language identifiers to fenced code blocks.
These fences are still unlabeled and continue to trigger MD040. Label each opening fence with the correct language (
bash,text, etc.).Proposed patch
-``` +```bash yarn test tests/mise_python_arch.bats-
+bash
yarn test tests/mise_python_arch.bats-``` +```text ✓ macOS arm64 returns aarch64-apple-darwin ✓ macOS x86_64 returns x86_64-apple-darwin ✓ Linux x86_64 glibc returns x86_64-unknown-linux-gnu ✓ Linux x86_64 musl returns x86_64-unknown-linux-musl ✓ Linux aarch64 glibc returns aarch64-unknown-linux-gnu ✓ Linux aarch64 musl returns aarch64-unknown-linux-musl ✓ Linux i686 glibc returns i686-unknown-linux-gnu ✓ Linux i386 is normalized to i686 musl ✓ Unknown OS exits 1 with no output 9 tests, 0 failures-
+textmise — unified tool version manager
https://mise.jdx.dev
-``` +```text # Python configuration set -q WORKON_HOME; or set -x WORKON_HOME "$XDG_DATA_HOME/virtualenvs"-
+bash
yarn test-``` +```bash yarn lint</details> Also applies to: 213-215, 218-230, 258-261, 309-312, 344-346, 352-354 <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@docs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.mdaround
lines 155 - 157, Several fenced code blocks (e.g., the blocks containing "yarn
test tests/mise_python_arch.bats", the test output block starting with "✓ macOS
arm64 returns aarch64-apple-darwin", the header blocks "# mise — unified tool
version manager" and "# Python configuration", and the commands "yarn test" /
"yarn lint") are missing language identifiers; update each opening fence to
include the appropriate language (use bash for shell/command snippets like "yarn
test..." and "yarn lint", and use text for plain program output or configuration
examples) so that unlabeled fences trigger MD040 is resolved.</details> </blockquote></details> </blockquote></details> <details> <summary>🧹 Nitpick comments (3)</summary><blockquote> <details> <summary>.claude/hooks/stop-lint-gate.sh (3)</summary><blockquote> `26-37`: **Use `[[` for the ec_status check (static analysis flag).** Line 29 should use `[[` for consistency with bash best practices. <details> <summary>Suggested fix</summary> ```diff -if [ $ec_status -ne 0 ]; then +if [[ $ec_status -ne 0 ]]; then🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh around lines 26 - 37, Replace the POSIX-style test [ $ec_status -ne 0 ] with the bash conditional [[ $ec_status -ne 0 ]] to satisfy the static analysis rule; update the conditional that checks the ec_status variable in stop-lint-gate.sh (the block that captures ec_output/ec_status) to use [[ ... ]] while preserving the existing logic that greps ec_output for download/rate-limit errors and sets output/status accordingly.
20-21: Suppressingyarn installstderr hides real failures.If
yarn installfails due to something other than noise (e.g., corrupt lockfile, network error), subsequent lint commands fail with confusing errors. Consider logging or checking the exit status.Alternative: fail gracefully with warning
-yarn install 2> /dev/null +if ! yarn install 2>/dev/null; then + echo "Warning: yarn install failed; lint may be unreliable" >&2 +fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh around lines 20 - 21, Remove the stderr suppression on the yarn install call in stop-lint-gate.sh and check its exit status: replace the line using "yarn install 2> /dev/null" with a plain "yarn install" (or capture stderr to a variable) and immediately test "$?" (or use "if ! yarn install; then") to log the actual error to stderr via echo/processLogger and exit non‑zero or print a clear warning before proceeding; update any downstream logic that assumes install succeeded (e.g., the lint invocation) to only run when the install succeeded.
7-12: Use[[for bash conditionals.Static analysis correctly flags line 11. Since this is a bash script,
[[is preferred over[for safer word splitting and globbing behavior.Suggested fix
- [ -n "$node_root" ] && [ -d "$node_root/bin" ] && export PATH="$node_root/bin:$PATH" + [[ -n "$node_root" && -d "$node_root/bin" ]] && export PATH="$node_root/bin:$PATH"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh around lines 7 - 12, Replace the POSIX [ ... ] test in the node_root conditional with bash's [[ ... ]] form to avoid word-splitting/globbing issues: change the line that reads '[ -n "$node_root" ] && [ -d "$node_root/bin" ] && export PATH="$node_root/bin:$PATH"' to use a single conditional like '[[ -n "$node_root" && -d "$node_root/bin" ]] && export PATH=...' so the check after 'node_root="$(mise where node ...)"' uses [[ ... ]] instead of [ ... ].
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@docs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.md`:
- Around line 155-157: Several fenced code blocks (e.g., the blocks containing
"yarn test tests/mise_python_arch.bats", the test output block starting with "✓
macOS arm64 returns aarch64-apple-darwin", the header blocks "# mise — unified
tool version manager" and "# Python configuration", and the commands "yarn test"
/ "yarn lint") are missing language identifiers; update each opening fence to
include the appropriate language (use bash for shell/command snippets like "yarn
test..." and "yarn lint", and use text for plain program output or configuration
examples) so that unlabeled fences trigger MD040 is resolved.
---
Nitpick comments:
In @.claude/hooks/stop-lint-gate.sh:
- Around line 26-37: Replace the POSIX-style test [ $ec_status -ne 0 ] with the
bash conditional [[ $ec_status -ne 0 ]] to satisfy the static analysis rule;
update the conditional that checks the ec_status variable in stop-lint-gate.sh
(the block that captures ec_output/ec_status) to use [[ ... ]] while preserving
the existing logic that greps ec_output for download/rate-limit errors and sets
output/status accordingly.
- Around line 20-21: Remove the stderr suppression on the yarn install call in
stop-lint-gate.sh and check its exit status: replace the line using "yarn
install 2> /dev/null" with a plain "yarn install" (or capture stderr to a
variable) and immediately test "$?" (or use "if ! yarn install; then") to log
the actual error to stderr via echo/processLogger and exit non‑zero or print a
clear warning before proceeding; update any downstream logic that assumes
install succeeded (e.g., the lint invocation) to only run when the install
succeeded.
- Around line 7-12: Replace the POSIX [ ... ] test in the node_root conditional
with bash's [[ ... ]] form to avoid word-splitting/globbing issues: change the
line that reads '[ -n "$node_root" ] && [ -d "$node_root/bin" ] && export
PATH="$node_root/bin:$PATH"' to use a single conditional like '[[ -n
"$node_root" && -d "$node_root/bin" ]] && export PATH=...' so the check after
'node_root="$(mise where node ...)"' uses [[ ... ]] instead of [ ... ].
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a0a7004b-58d6-45e2-a600-193a2b989a7d
📒 Files selected for processing (10)
.claude/hooks/stop-lint-gate.sh.claude/skills/adversarial-reviewer/SKILL.md.mise.tomlconfig/exportsconfig/fish/exports.fishconfig/mise/config.tomldocs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.mddocs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.mdlocal/bin/mise-python-archtests/mise_python_arch.bats
✅ Files skipped from review due to trivial changes (5)
- .mise.toml
- config/exports
- config/mise/config.toml
- local/bin/mise-python-arch
- .claude/skills/adversarial-reviewer/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (3)
- config/fish/exports.fish
- tests/mise_python_arch.bats
- docs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.md
|
@copilot Verify each finding against the current code and only fix it if needed. Duplicate comments:
Nitpick comments:
|
…stop-lint-gate - Add language identifiers to 7 unlabeled fenced code blocks in the mise-python-precompiled-arch plan (MD040): bash for command snippets, text for program output, sh/fish for find-string examples - stop-lint-gate.sh: replace [ ] with [[ ]] for node_root check (line 11) - stop-lint-gate.sh: replace [ $ec_status -ne 0 ] with [[ ]] (line 31) - stop-lint-gate.sh: check yarn install exit status instead of suppressing stderr with 2>/dev/null Agent-Logs-Url: https://github.com/ivuorinen/dotfiles/sessions/62f5e666-c355-4b2c-bda0-01c18b47c500 Co-authored-by: ivuorinen <11024+ivuorinen@users.noreply.github.com>
Fixed in commit 845ed80. All findings verified against current code: Plan file (MD040) — 7 unlabeled fenced code blocks fixed:
shellcheck, biome, prettier, and md-table lint all pass. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | File | Action | Responsibility | | ||
| |-------------------------------|--------------------|------------------------------------------------------------------| | ||
| | `local/bin/mise-python-arch` | Create | Detection script — prints LLVM arch triple to stdout | | ||
| | `tests/mise_python_arch.bats` | Create | 9-case bats test suite | |
There was a problem hiding this comment.
The File Map says tests/mise_python_arch.bats is a "9-case" suite, but the added bats file contains 11 test cases. Adjust the count (or remove it) to keep the plan consistent with the actual coverage.
| | `tests/mise_python_arch.bats` | Create | 9-case bats test suite | | |
| | `tests/mise_python_arch.bats` | Create | 11-case bats test suite | |
| if command -v mise-python-arch >/dev/null 2>&1 | ||
| mise-python-arch 2>/dev/null | while read -l _line | ||
| set -l _kv (string replace -r '^export ' '' -- $_line) | ||
| set -l _key (string split -m1 '=' $_kv)[1] | ||
| set -l _val (string replace -r '^[^=]+="|"$' '' -- $_kv | string replace -ra '"' '') | ||
| if test -n "$_key" | ||
| set -gx $_key $_val | ||
| end | ||
| end | ||
| end |
There was a problem hiding this comment.
In fish, commands in a pipeline run in a separate process; variables set inside ... | while read ... (even with set -gx) do not propagate back to the parent shell. As a result, MISE_PYTHON_PRECOMPILED_ARCH/OS will not be set after this block runs, so mise won't see them. Refactor to avoid setting variables inside a piped while (e.g., capture output with command substitution/string collect and iterate in the current process).
| { | ||
| STUB_DIR="$(mktemp -d)" | ||
| export PATH="$STUB_DIR:$PATH" | ||
| SCRIPT="$PWD/local/bin/mise-python-arch" |
There was a problem hiding this comment.
This test suite hard-codes the helper path via $PWD, so it fails if the tests are executed from a directory other than the repo root (e.g., cd tests && bats mise_python_arch.bats). Use a path anchored to the test file location (like $BATS_TEST_DIRNAME/../local/bin/...) to make the tests runnable from any working directory (see tests/x-help.bats for the pattern).
| SCRIPT="$PWD/local/bin/mise-python-arch" | |
| SCRIPT="$BATS_TEST_DIRNAME/../local/bin/mise-python-arch" |
| ec_output=$(yarn lint:ec 2>&1) | ||
| ec_status=$? | ||
| if [[ $ec_status -ne 0 ]]; then | ||
| if echo "$ec_output" | grep -q "rate limit\|Failed to download\|HttpError"; then |
There was a problem hiding this comment.
The grep pattern uses \| alternation without -E. On BSD/macOS grep, \| is treated as a literal |, so rate-limit download failures won't be detected and will incorrectly fail the gate. Switch to grep -E with | alternation (or run multiple grep -q checks) so the skip logic works cross-platform.
| if echo "$ec_output" | grep -q "rate limit\|Failed to download\|HttpError"; then | |
| if echo "$ec_output" | grep -Eq "rate limit|Failed to download|HttpError"; then |
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @ivuorinen. * #344 (comment) The following files were modified: * `tests/mise_python_arch.bats`
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.claude/hooks/stop-lint-gate.sh (1)
14-18:⚠️ Potential issue | 🟠 MajorUnconditional fallback PATH prepend still overrides
misebinaries.This was flagged previously as Major and the code remains unchanged — Line 15 unconditionally prepends
$HOME/.local/bin:/usr/local/bin, which shadows themise-provisionednode/binjust placed at the front of PATH on Lines 10–11 and can re-select legacyyarnv1. Gate the fallback on yarn being missing or v1.Proposed fix
-# Fall back to corepack shim locations if yarn is still the legacy v1 -export PATH="$HOME/.local/bin:/usr/local/bin:$PATH" -if command -v corepack > /dev/null 2>&1; then - corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true -fi +# Fall back to corepack shim location only when yarn is missing or legacy v1 +if ! command -v yarn > /dev/null 2>&1 || yarn --version 2>/dev/null | grep -q '^1\.'; then + export PATH="$HOME/.local/bin:$PATH" + if command -v corepack > /dev/null 2>&1; then + corepack enable --install-directory "$HOME/.local/bin" 2> /dev/null || true + fi +fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh around lines 14 - 18, The PATH prepend currently unconditionally shadows mise's node/bin; change it to only prepend $HOME/.local/bin:/usr/local/bin when yarn is missing or is legacy v1: check with `command -v yarn >/dev/null || yarn --version | grep -E '^1(\.|$)' >/dev/null` (or equivalent) and only then set PATH and run `corepack enable --install-directory "$HOME/.local/bin" ...`; keep the existing corepack block but gate the PATH assignment and corepack invocation behind that yarn-missing-or-v1 test so mise-provided node/bin remains first when yarn is modern/present.
🧹 Nitpick comments (4)
.claude/hooks/stop-lint-gate.sh (3)
41-41: Use[[ ... ]]here for consistency with the rest of the script.Lines 11 and 31 were converted to
[[ ... ]]; Line 41 still uses POSIX[ ... ]. Minor consistency nit.Proposed fix
-if [ $status -ne 0 ]; then +if [[ $status -ne 0 ]]; then🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh at line 41, The conditional at line with "if [ $status -ne 0 ]; then" uses the POSIX test form while the rest of the script uses Bash's extended conditional; update this to the Bash-style conditional by replacing the test with "if [[ $status -ne 0 ]]; then" (keep the variable name "status" and spacing intact) so it matches the other checks and avoids branching style inconsistency in stop-lint-gate.sh.
25-26: Chained&&short-circuits and drops later lint output.On Line 25 the three linters are chained with
&&, so iflint:biomefails,lint:prettierandlint:md-tablenever run and their findings are hidden until the next stop-gate invocation. Since you're already aggregating into a singleoutput/status, consider running each step independently and OR'ing their statuses so the developer sees all lint problems in one pass.Proposed fix
-output=$(yarn lint:biome 2>&1 && yarn lint:prettier 2>&1 && yarn lint:md-table 2>&1) -status=$? +status=0 +for step in lint:biome lint:prettier lint:md-table; do + step_output=$(yarn "$step" 2>&1) + step_status=$? + output="${output:+$output$'\n'}$step_output" + [[ $step_status -ne 0 ]] && status=$step_status +done🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh around lines 25 - 26, The current script uses a chained command to populate `output=$(yarn lint:biome 2>&1 && yarn lint:prettier 2>&1 && yarn lint:md-table 2>&1)` which short-circuits and prevents later linters from running; change it to run each linter separately (execute `yarn lint:biome`, `yarn lint:prettier`, `yarn lint:md-table` one after another), append each command's stdout/stderr into the `output` variable (e.g., accumulate with `output="$output\n$(... 2>&1)"`), and compute `status` as the logical OR of their exit codes (set `status` to non-zero if any of the three commands fails) so all lint outputs are shown in one run.
32-32: Prefergrepon a here-string overecho | grepfor pattern matching.
echo "$ec_output" | grepcan misbehave ifec_outputcontains leading-arguments or backslash escapes (behavior depends onechoimplementation). A here-string is safer and avoids the subshell pipe.Proposed fix
- if echo "$ec_output" | grep -q "rate limit\|Failed to download\|HttpError"; then + if grep -qE "rate limit|Failed to download|HttpError" <<< "$ec_output"; then🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/hooks/stop-lint-gate.sh at line 32, The if-condition uses echo "$ec_output" | grep which can misbehave with leading dashes or escape sequences; update the check in stop-lint-gate.sh to feed ec_output to grep via a here-string (use grep -q "rate limit\|Failed to download\|HttpError" <<< "$ec_output") so pattern matching is safe and avoids the echo pipe, keeping the same variable name ec_output and the same patterns.config/fish/exports.fish (1)
111-120: Parsing is brittle but fits current helper contract.The two-pass quote stripping (
'^[^=]+="|"$'then'"'→'') works becausemise-python-archonly emits simple alphanumeric/hyphen values. If the helper ever emits a value containing"or whitespace, this parser will silently mangle it (inner quotes gone, spaces become list elements viaset -gx $_key $_val).Since the contract is internal and covered by tests, this is acceptable. Consider a tighter parser if the helper's output grows.
Optional: more explicit parse
- mise-python-arch 2>/dev/null | while read -l _line - set -l _kv (string replace -r '^export ' '' -- $_line) - set -l _key (string split -m1 '=' $_kv)[1] - set -l _val (string replace -r '^[^=]+="|"$' '' -- $_kv | string replace -ra '"' '') - if test -n "$_key" - set -gx $_key $_val - end - end + mise-python-arch 2>/dev/null | while read -l _line + set -l _match (string match -r '^export ([A-Z_][A-Z0-9_]*)="(.*)"$' -- $_line) + if test (count $_match) -eq 3 + set -gx $_match[2] $_match[3] + end + end🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/fish/exports.fish` around lines 111 - 120, The parser strips inner quotes and splits values with spaces because it removes all double quotes and then relies on word-splitting when calling set -gx; instead only strip a single pair of surrounding quotes from the RHS and pass the value as a single quoted argument to set to preserve spaces/inner quotes: change the value extraction logic around _kv/_val (replace the two-step string replace that uses '^[^=]+="|"$' and then '"' -> '' with a single regex that captures and removes only leading+trailing quotes, e.g. string replace -r '^"(.*)"$' '$1' -- $_kv or equivalent, and call set -gx -- $_key "$_val" so the variable is assigned as one value without word-splitting).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/hooks/stop-lint-gate.sh:
- Around line 20-23: The script .claude/hooks/stop-lint-gate.sh currently only
warns on a failed "yarn install" which lets subsequent lint commands like "yarn
lint:biome" run against a broken tree; change the behavior so that if the "yarn
install" command fails the script exits non‑zero (suggest exit 2) to stop
further lint stages, i.e., detect failure of the "yarn install" invocation and
call exit with a non‑zero status instead of just echoing a warning.
---
Duplicate comments:
In @.claude/hooks/stop-lint-gate.sh:
- Around line 14-18: The PATH prepend currently unconditionally shadows mise's
node/bin; change it to only prepend $HOME/.local/bin:/usr/local/bin when yarn is
missing or is legacy v1: check with `command -v yarn >/dev/null || yarn
--version | grep -E '^1(\.|$)' >/dev/null` (or equivalent) and only then set
PATH and run `corepack enable --install-directory "$HOME/.local/bin" ...`; keep
the existing corepack block but gate the PATH assignment and corepack invocation
behind that yarn-missing-or-v1 test so mise-provided node/bin remains first when
yarn is modern/present.
---
Nitpick comments:
In @.claude/hooks/stop-lint-gate.sh:
- Line 41: The conditional at line with "if [ $status -ne 0 ]; then" uses the
POSIX test form while the rest of the script uses Bash's extended conditional;
update this to the Bash-style conditional by replacing the test with "if [[
$status -ne 0 ]]; then" (keep the variable name "status" and spacing intact) so
it matches the other checks and avoids branching style inconsistency in
stop-lint-gate.sh.
- Around line 25-26: The current script uses a chained command to populate
`output=$(yarn lint:biome 2>&1 && yarn lint:prettier 2>&1 && yarn lint:md-table
2>&1)` which short-circuits and prevents later linters from running; change it
to run each linter separately (execute `yarn lint:biome`, `yarn lint:prettier`,
`yarn lint:md-table` one after another), append each command's stdout/stderr
into the `output` variable (e.g., accumulate with `output="$output\n$(...
2>&1)"`), and compute `status` as the logical OR of their exit codes (set
`status` to non-zero if any of the three commands fails) so all lint outputs are
shown in one run.
- Line 32: The if-condition uses echo "$ec_output" | grep which can misbehave
with leading dashes or escape sequences; update the check in stop-lint-gate.sh
to feed ec_output to grep via a here-string (use grep -q "rate limit\|Failed to
download\|HttpError" <<< "$ec_output") so pattern matching is safe and avoids
the echo pipe, keeping the same variable name ec_output and the same patterns.
In `@config/fish/exports.fish`:
- Around line 111-120: The parser strips inner quotes and splits values with
spaces because it removes all double quotes and then relies on word-splitting
when calling set -gx; instead only strip a single pair of surrounding quotes
from the RHS and pass the value as a single quoted argument to set to preserve
spaces/inner quotes: change the value extraction logic around _kv/_val (replace
the two-step string replace that uses '^[^=]+="|"$' and then '"' -> '' with a
single regex that captures and removes only leading+trailing quotes, e.g. string
replace -r '^"(.*)"$' '$1' -- $_kv or equivalent, and call set -gx -- $_key
"$_val" so the variable is assigned as one value without word-splitting).
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ba310e19-b86f-4d9d-a4e9-246550cfce3c
📒 Files selected for processing (10)
.claude/hooks/stop-lint-gate.sh.claude/skills/adversarial-reviewer/SKILL.md.mise.tomlconfig/exportsconfig/fish/exports.fishconfig/mise/config.tomldocs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.mddocs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.mdlocal/bin/mise-python-archtests/mise_python_arch.bats
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 4 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 4 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
|
Up to standards ✅🟢 Issues
|



This pull request introduces a portable detection helper for Python precompiled architecture, ensuring that the correct precompiled Python binary is selected by
miseon all supported systems. The main addition is a new script,local/bin/mise-python-arch, which detects the system's architecture and libc type, then exports the appropriate LLVM target triple. The helper is integrated into both POSIX shell and fish shell startup files, and is fully tested with a comprehensive bats test suite. Detailed documentation and a spec are also included.Detection Helper Implementation:
local/bin/mise-python-arch, a POSIX shell script that detects the current OS, CPU architecture, and libc (for Linux), normalizes values, and prints the correct LLVM target triple for use with precompiled Python binaries. This script exits 0 with output on success or 1 with no output if the system is unrecognized. [1] [2]Shell Integration:
config/exportsto invokemise-python-archand exportMISE_PYTHON_PRECOMPILED_ARCHbefore activatingmisein bash, sh, and zsh shells.config/fish/exports.fishto invokemise-python-archand exportMISE_PYTHON_PRECOMPILED_ARCHin the fish shell, ensuring consistent environment setup across all supported shells.Testing and Documentation:
tests/mise_python_arch.bats, a bats test suite covering nine scenarios (different OS, CPU, and libc combinations) to verify correct detection and output of the helper script.docs/superpowers/plans/2026-04-12-mise-python-precompiled-arch.md) and design spec (docs/superpowers/specs/2026-04-12-mise-python-precompiled-arch-design.md) documenting the motivation, usage, and coverage of the new detection helper. [1] [2]